#include "SingleControlPointObject.h"


SingleControlPointObject::SingleControlPointObject()
{
	SetPosition(0.0f,0.0f,0.0f);
	SetRotation(0.0f,0.0f,0.0f);
}
void SingleControlPointObject::SetPosition(float x,float y,float z)
{
	position = glm::vec3(x,y,z);
}
void SingleControlPointObject::SetPosition(glm::vec3 position)
{
	this->position = position;
}

glm::vec3 SingleControlPointObject::GetPosition()
{
	return position;
}

void SingleControlPointObject::Move(float x,float y,float z)
{
	position += glm::vec3(x,y,z);
}
void SingleControlPointObject::Move(glm::vec3 offSet)
{
	position += offSet;
}
void SingleControlPointObject::SetRotation(float x,float y,float z)
{
	rotation = glm::vec3(x,y,z);
}
void SingleControlPointObject::SetRotation(glm::vec3 rotation)
{
	this->rotation = rotation;
}

glm::vec3 SingleControlPointObject::GetRotation()
{
	return rotation;
}

void SingleControlPointObject::Rotate(float degress,Axis axis)
{
	if(axis == AXIS_X)
		rotation.x += degress;
	else if(axis == AXIS_Y)
		rotation.y += degress;
	else rotation.z += degress;
}